/*
 * Xiazaiwancheng.java
 *
 * Created on __DATE__, __TIME__
 */

package WindowsModule;

import java.awt.Color;
import java.awt.Cursor;
import java.awt.Point;
import java.awt.Toolkit;

/**
 * 
 * @author __USER__
 */
public class Xiazaiwancheng extends javax.swing.JFrame {

	/**
	 * @param args
	 *            the command line arguments
	 */
	public static void main(String args[]) {
		java.awt.EventQueue.invokeLater(new Runnable() {
			@Override
			public void run() {
				Xiazaiwancheng xzw = new Xiazaiwancheng();
				xzw.setVisible(true);
				xzw.start((int) (xzw.getLocation().y - xzw.getSize().getHeight()));
			}
		});
	}

	// GEN-BEGIN:variables
	// Variables declaration - do not modify
	private javax.swing.JLabel jLabel1;

	private javax.swing.JLabel jLabel10;

	private javax.swing.JLabel jLabel2;

	private javax.swing.JLabel jLabel3;

	private javax.swing.JLabel jLabel4;

	private javax.swing.JLabel jLabel5;

	private javax.swing.JLabel jLabel6;

	private javax.swing.JLabel jLabel7;

	private javax.swing.JLabel jLabel8;

	private javax.swing.JLabel jLabel9;
	// End of variables declaration//GEN-END:variables

	/** Creates new form Xiazaiwancheng */
	public Xiazaiwancheng() {
		initComponents();
		double width = Toolkit.getDefaultToolkit().getScreenSize().getWidth();
		double height = Toolkit.getDefaultToolkit().getScreenSize().getHeight();
		int x = (int) ((width - this.getSize().getWidth()) - 5);
		int y = (int) ((height - 15));
		this.setLocation(x, y);
	}

	/**
	 * This method is called from within the constructor to initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is always
	 * regenerated by the Form Editor.
	 */
	// GEN-BEGIN:initComponents
	// <editor-fold defaultstate="collapsed" desc="Generated Code">
	private void initComponents() {

		jLabel1 = new javax.swing.JLabel();
		jLabel2 = new javax.swing.JLabel();
		jLabel3 = new javax.swing.JLabel();
		jLabel4 = new javax.swing.JLabel();
		jLabel5 = new javax.swing.JLabel();
		jLabel6 = new javax.swing.JLabel();
		jLabel7 = new javax.swing.JLabel();
		jLabel8 = new javax.swing.JLabel();
		jLabel9 = new javax.swing.JLabel();
		jLabel10 = new javax.swing.JLabel();

		setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
		setTitle("\u4e0b\u8f7d\u7ed3\u679c");
		setUndecorated(true);

		jLabel1.setText("\u5df2\u4e0b\u8f7d\u5b8c\u6210");

		jLabel2.setText("\u6587\u4ef6\u540d\uff1a");

		jLabel3.setText("ssssssssssssssssssssss");

		jLabel4.setText("\u6587\u4ef6\u5927\u5c0f\uff1a");

		jLabel5.setText("yyyyyyyyyyyyyyyyyyyyyy");

		jLabel6.setText("MD5\uff1a");

		jLabel7.setText("zzzzzzzzzzzzzzzzzzzzzzz");

		jLabel8.setText("\u6253\u5f00\u6587\u4ef6");
		jLabel8.addMouseListener(new java.awt.event.MouseAdapter() {
			@Override
			public void mouseClicked(java.awt.event.MouseEvent evt) {
				jLabel8MouseClicked(evt);
			}

			@Override
			public void mouseEntered(java.awt.event.MouseEvent evt) {
				jLabel8MouseEntered(evt);
			}

			@Override
			public void mouseExited(java.awt.event.MouseEvent evt) {
				jLabel8MouseExited(evt);
			}
		});

		jLabel9.setText("\u5173\u95ed");
		jLabel9.addMouseListener(new java.awt.event.MouseAdapter() {
			@Override
			public void mouseClicked(java.awt.event.MouseEvent evt) {
				jLabel9MouseClicked(evt);
			}

			@Override
			public void mouseEntered(java.awt.event.MouseEvent evt) {
				jLabel9MouseEntered(evt);
			}

			@Override
			public void mouseExited(java.awt.event.MouseEvent evt) {
				jLabel9MouseExited(evt);
			}
		});

		jLabel10.setText("\u6253\u5f00\u6587\u4ef6\u5939");
		jLabel10.addMouseListener(new java.awt.event.MouseAdapter() {
			@Override
			public void mouseEntered(java.awt.event.MouseEvent evt) {
				jLabel10MouseEntered(evt);
			}

			@Override
			public void mouseExited(java.awt.event.MouseEvent evt) {
				jLabel10MouseExited(evt);
			}
		});

		javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
		getContentPane().setLayout(layout);
		layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
				layout.createSequentialGroup().addGap(32, 32, 32).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING).addComponent(jLabel6).addComponent(jLabel2).addComponent(jLabel4).addComponent(jLabel8, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
						.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false).addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel1)).addGroup(layout.createSequentialGroup().addComponent(jLabel10).addGap(18, 18, 18).addComponent(jLabel9))).addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
		layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
				layout.createSequentialGroup().addGap(20, 20, 20).addComponent(jLabel1).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel2).addComponent(jLabel3)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel4).addComponent(jLabel5)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel6).addComponent(jLabel7)).addGap(36, 36, 36)
						.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel10).addComponent(jLabel9)).addContainerGap(38, Short.MAX_VALUE)));

		pack();
	}// </editor-fold>
		// GEN-END:initComponents
	private void jLabel10MouseEntered(java.awt.event.MouseEvent evt) {
		// TODO add your handling code here:
		jLabel10.setForeground(Color.blue);
		jLabel10.setCursor(new Cursor(HAND_CURSOR));
	}
	private void jLabel10MouseExited(java.awt.event.MouseEvent evt) {
		// TODO add your handling code here:
		jLabel10.setForeground(Color.black);
	}
	private void jLabel8MouseClicked(java.awt.event.MouseEvent evt) {
		// TODO add your handling code here:

	}
	private void jLabel8MouseEntered(java.awt.event.MouseEvent evt) {
		// TODO add your handling code here:
		jLabel8.setForeground(Color.blue);
		jLabel8.setCursor(new Cursor(HAND_CURSOR));
	}
	private void jLabel8MouseExited(java.awt.event.MouseEvent evt) {
		// TODO add your handling code here:
		jLabel8.setForeground(Color.black);
	}
	private void jLabel9MouseClicked(java.awt.event.MouseEvent evt) {
		// TODO add your handling code here:
		System.exit(0);
	}
	private void jLabel9MouseEntered(java.awt.event.MouseEvent evt) {
		// TODO add your handling code here:
		jLabel9.setForeground(Color.blue);
		jLabel9.setCursor(new Cursor(HAND_CURSOR));
	}
	private void jLabel9MouseExited(java.awt.event.MouseEvent evt) {
		// TODO add your handling code here:
		jLabel9.setForeground(Color.black);
	}
	private void start(final int Y) {
		new Thread(new Runnable() {
			@Override
			public void run() {
				while (getLocation().y > Y) {
					setLocation(new Point(getLocation().x, getLocation().y - 3));
					try {
						Thread.sleep(10);
					} catch (InterruptedException e) {
					}
				}
			}
		}).start();
	}

}